<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改文件记录')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-detail-edit" th:object="${fileDetail}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">文件访问地址：</label>
                    <div class="col-sm-8">
                        <textarea name="url" class="form-control" required>[[*{url}]]</textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">文件大小，单位字节：</label>
                    <div class="col-sm-8">
                        <input name="size" th:field="*{size}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">文件名称：</label>
                    <div class="col-sm-8">
                        <input name="filename" th:field="*{filename}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">原始文件名：</label>
                    <div class="col-sm-8">
                        <input name="originalFilename" th:field="*{originalFilename}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">基础存储路径：</label>
                    <div class="col-sm-8">
                        <input name="basePath" th:field="*{basePath}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">存储路径：</label>
                    <div class="col-sm-8">
                        <input name="path" th:field="*{path}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">文件扩展名：</label>
                    <div class="col-sm-8">
                        <input name="ext" th:field="*{ext}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">存储平台：</label>
                    <div class="col-sm-8">
                        <input name="platform" th:field="*{platform}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">缩略图访问路径：</label>
                    <div class="col-sm-8">
                        <textarea name="thUrl" class="form-control">[[*{thUrl}]]</textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">缩略图名称：</label>
                    <div class="col-sm-8">
                        <input name="thFilename" th:field="*{thFilename}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">缩略图大小，单位字节：</label>
                    <div class="col-sm-8">
                        <input name="thSize" th:field="*{thSize}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">文件所属对象id：</label>
                    <div class="col-sm-8">
                        <input name="objectId" th:field="*{objectId}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">文件元数据：</label>
                    <div class="col-sm-8">
                        <textarea name="metadata" class="form-control">[[*{metadata}]]</textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">文件用户元数据：</label>
                    <div class="col-sm-8">
                        <textarea name="userMetadata" class="form-control">[[*{userMetadata}]]</textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">缩略图元数据：</label>
                    <div class="col-sm-8">
                        <textarea name="thMetadata" class="form-control">[[*{thMetadata}]]</textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">缩略图用户元数据：</label>
                    <div class="col-sm-8">
                        <textarea name="thUserMetadata" class="form-control">[[*{thUserMetadata}]]</textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">附加属性：</label>
                    <div class="col-sm-8">
                        <textarea name="attr" class="form-control">[[*{attr}]]</textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">文件ACL：</label>
                    <div class="col-sm-8">
                        <input name="fileAcl" th:field="*{fileAcl}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">缩略图文件ACL：</label>
                    <div class="col-sm-8">
                        <input name="thFileAcl" th:field="*{thFileAcl}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">哈希信息：</label>
                    <div class="col-sm-8">
                        <textarea name="hashInfo" class="form-control">[[*{hashInfo}]]</textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">上传ID，仅在手动分片上传时使用：</label>
                    <div class="col-sm-8">
                        <input name="uploadId" th:field="*{uploadId}" class="form-control" type="text">
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "file/detail";
        $("#form-detail-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-detail-edit').serialize());
            }
        }
    </script>
</body>
</html>